package com.qb.common.widget
import android.content.Context
import android.util.AttributeSet
import android.webkit.WebView
class GifWebView @JvmOverloads constructor(
    context: Context,
    attrs: AttributeSet? = null,
    defStyleAttr: Int = 0
) : WebView(context, attrs, defStyleAttr) {

    fun loadGifUrl(url: String) {
        val html = "<html><body><img src=\"$url\" /></body></html>"
        loadDataWithBaseURL(null, html, "text/html", "utf-8", null)
    }
}